import request from '@/utils/request'

// 查询出差申请列表
export function listFinanceTripApply(query) {
  return request({
    url: '/oa/financeTripApply/list',
    method: 'get',
    params: query
  })
}

// 查询出差申请详细
export function getFinanceTripApply(id) {
  return request({
    url: '/oa/financeTripApply/' + id,
    method: 'get'
  })
}

// 新增出差申请
export function addFinanceTripApply(data) {
  return request({
    url: '/oa/financeTripApply',
    method: 'post',
    data: data
  })
}

// 修改出差申请
export function updateFinanceTripApply(data) {
  return request({
    url: '/oa/financeTripApply',
    method: 'put',
    data: data
  })
}

// 删除出差申请
export function delFinanceTripApply(id) {
  return request({
    url: '/oa/financeTripApply/' + id,
    method: 'delete'
  })
}
// 获取没有出差申请的项目信息
export function getProjectList() {
  return request({
    url: '/oa/financeTripApply/getProjectList',
    method: 'get'
  })
}


// 通过项目名称查询出差申请
export function queryFinanceTripByProjectName(data) {
  return request({
    url: '/oa/financeTripApply/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
